import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class MainWindow extends JFrame implements ActionListener{
	
	private JFrame frame;
	private JButton buttonDiapo, buttonOpen, buttonSearch, buttonTag, buttonAlbum, buttonQuit;
	private JPanel panel;
	
	public MainWindow()
	{
			frame = new JFrame("The best Jphoto");
			frame.setSize(300, 400);
			frame.setLocation(200, 200);
			buttonDiapo = new JButton("Diaporama");
			buttonOpen = new JButton("Ouvrir Photo");
			buttonQuit = new JButton ("Quitter");
			buttonSearch = new JButton("Recherche par tag");
			buttonTag = new JButton("Add tag");
			buttonAlbum = new JButton("Creer un album");
			panel = new JPanel();
			//ajout du action Listener pour le bouton Open
			buttonOpen.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					// new OpenImg();
				}
			});
			//ajout du action Listener pour le bouton Diapo
			buttonDiapo.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					new Diaporama();
				}
			});
			buttonQuit.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					System.exit(0);
				}
			});
			
			buttonAlbum.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					// new Album();
				}
			});
			
			buttonSearch.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					// new Search();
				}
			});
			
			buttonTag.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					// new Tag();
				}
			});
			
			panel.setLayout(new FlowLayout());
			panel.add(buttonOpen);
			panel.add(buttonDiapo);
			panel.add(buttonAlbum);
			panel.add(buttonSearch);
			panel.add(buttonTag);
			panel.add(buttonQuit);
			frame.getContentPane().add(panel, BorderLayout.CENTER);
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			frame.pack();
			frame.setVisible(true);
		}
	
	
		public static void main(String[] args) {
			// Set the look and feel to Java Swing Look
			new MainWindow();
		}


		@Override
		public void actionPerformed(ActionEvent e) {
			// TODO Auto-generated method stub
			
		}
}